package file;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 张杰
 * Date: 2022-04-18
 * Time: 20:23
 */
public class Demo2 {
    public static void main(String[] args) throws IOException {
        /*File f = new File("d:/test.txt");
        System.out.println(f.exists());
        System.out.println(f.isDirectory());//是否是目录文件
        System.out.println(f.isFile());//是否是普通文件*/

        File f = new File("./test.txt");
        System.out.println(f.exists());
        System.out.println("创建文件");
        f.createNewFile();
        System.out.println("创建文件结束");
        System.out.println(f.exists());
    }
}
